<link type="text/css" rel="stylesheet" href="/Public/Admin/Css/skin.css">
<script>
function Sub(){
	var f = document.getElementById('form1');
	var str = document.getElementsByName("goodsId");
	var objarray = str.length;
	var chestr="";
	var j= 0;

	for (i=0;i<objarray;i++){
	  if( str[i].checked == true ){
	   chestr += str[i].value + ",";
	   j++;
	  }
	}
	if( chestr == "" ){
	  alert("请先选择一个商品！");
	  return false;
	}else if(j>3){
		alert("最多选择3个商品");
		return false;
	}else{
		document.getElementById("goodArr").value = chestr;
	}
	f.submit();
}
</script>
<form action="__APP__/Star/addRecom" id="form1" method="post" enctype="multipart/form-data">
<table width="600" border="0" cellpadding="0" cellspacing="0">
	<tr class="nowtable">
	  <td class="left_bt2" align="center"></td>
	  <td class="left_bt2" align="center">商品图片</td>
	  <td class="left_bt2" align="center">商品名称</td>
	  <td class="left_bt2" align="center">商品价格</td>
	  <td class="left_bt2" align="center">链接地址</td>
	  <td class="left_bt2" align="center">人气</td>
	</tr>
	<volist name="goodsinfo" id="vo" mod="2">  
	<tr <eq name="mod" value="1">bgcolor="#f2f2f2"</eq> > 
	  <td height="40" class="left_txt" align="center"><input type="checkbox" name="goodsId" value="{$vo.goods_code}"></td> 
	  <td height="40" class="left_txt" align="center"><img src="__PUBLIC__/Uploads/Goods/72_{$vo.goods_photo_add}" width="40" hieght="40" ></td> 
	  <td height="40" class="left_txt" align="center" title="{$vo.goods_name}">{$vo.goods_name|msubstr=0,16,'utf-8',false}</td>      
	  <td height="40" class="left_txt" align="center">{$vo.goods_price}</td>
	  <td height="40" class="left_txt" align="center"><a href="http://{$vo.goods_path}" target="_blank">{$vo.goods_path|substr=0,30}</a></td>
</eq></td>
	  <td height="40" class="left_txt" align="center">{$vo.goods_like_num}</td>
	</tr>
	</volist>
</table>
<input type="hidden" id="goodArr" name="goodArr" value="">
<input type="hidden" id="starid" name="starid" value="{$starid}">
<form><br>
<div align="center"><input type="button" onclick="Sub();" value="保 存"></div>